.btn-group {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 创建 3 列，每列宽度相等 */
    grid-template-rows: repeat(1, 1fr); /* 创建 3 行，每行高度相等 */
    gap: 10px; /* 控件之间的间距 */
    padding: 10px; /* 内边距 */
    /*border: 1px solid #ddd; /* 边框 */
    width: 300px; /* 容器宽度 */
    height: 150px; /* 容器高度 */
}

.udp_listen{
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 创建 3 列，每列宽度相等 */
    grid-template-rows: repeat(1, 1fr); /* 创建 3 行，每行高度相等 */
    gap: 10px; /* 控件之间的间距 */
    padding: 10px; /* 内边距 */
    margin-top: 150px;
    /*border: 1px solid #ddd; /* 边框 */
}

.servo_item
{
    width: 200px;
    height: 50px;
    color: #2196F3;
}



.btn-group .btn {
    flex: 1;
    max-width: 200px;
}
        /* 基本样式 */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

/* 隐藏默认的开关控件 */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* 开关容器 */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

/* 圆形的滑块 */
.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    border-radius: 50%;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

/* 开关开启状态 */
input:checked + .slider {
    background-color: #2196F3;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.one {
    display: flex;
    flex-direction: column; /* 纵向排列 */
    gap: 10px; /* 控件间的间距 */
    padding: 20px; /* 内边距 */
    border: 1px solid #ccc; /* 边框 */
    width: 200px; /* 容器宽度 */
}

.udp_form {
    display: flex;
    flex-direction: column; /* 纵向排列 */
    gap: 10px; /* 控件间的间距 */
    padding: 20px; /* 内边距 */
    /*border: 1px solid #ccc; /* 边框 */
    width: 200px; /* 容器宽度 */
}

.servo-text
{
    display: flex;
    flex-direction: column; /* 纵向排列 */
    gap: 10px; /* 控件间的间距 */
    padding: 20px; /* 内边距 */
    width: 200px; /* 容器宽度 */
    height: 200px;
}


.text
{
    display: flex;
    flex-direction: column; /* 纵向排列 */
    gap: 10px; /* 控件间的间距 */
    padding: 20px; /* 内边距 */
    width: 500px; /* 容器宽度 */
    height: 800px;
    margin-top: -400px;
}

.download
{
    display: flex;
    flex-direction: column; /* 纵向排列 */
    gap: 10px; /* 控件间的间距 */
    padding: 20px; /* 内边距 */
    margin-top: -415px;
    width: 540px;
    margin-left: 620px;
}

.one-one label
{
    /*position: absolute;*/
    margin-left: 1px;
    margin-right: 5px;
    color: #888;
    transition: all 0.3s;
}


canvas {
    border: 1px solid black;
    display: block;
    margin: auto;
}
.rectangle {
    border: 1px dashed red;
    position: absolute;
    pointer-events: none;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    min-width: 250px;
    max-width: 250px;
    background-color: #f8f9fa;
    padding: 15px;
    height: 100%;
    transform: translateX(-250px);
    transition: transform 0.3s ease;
}
.sidebar.show {
    transform: translateX(0);
}

.sidebar-toggle {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1000;
    cursor: pointer;
}

#output {
    width: 500px;
    height: 800px;
    overflow-y: scroll;
    white-space: pre-wrap;
    border: 1px solid #ddd;
    margin-left: 20px;
    margin-top: -440px;
    padding: 10px;
    font-family: monospace;
}